// app.js
const express = require('express')
const FileManager = require('./fileManager')
const serveStatic = require('serve-static')
const app = express()

// 在public下开启服务
app.use(serveStatic('public', { redirect: true }))
// 设置根路径
const rootDirName = './public/'
const fileManager = new FileManager()
// 调用初始化文件夹
fileManager.initDir(rootDirName, true)

app.listen(3000)